package com.zh.flowable;

import lombok.extern.slf4j.Slf4j;
import org.springframework.boot.CommandLineRunner;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

import static com.zh.flowable.support.SpringContextHolder.getProperty;

/**
 * Hello world!
 * <br/>
 * <code> curl http://localhost:8080/actuator/health </code>
 * <br/>
 * 打包为docker镜像命令：
 * <br/>
 * <code> docker build --build-arg jar_file=target/demo_simple-1.0.jar -t demo/simple </code>
 */
@Slf4j
@SpringBootApplication
public class AppFlow implements CommandLineRunner {

    public static void main(String[] args) {
        SpringApplication.run(AppFlow.class, args);
        System.err.printf("application startup success... [server.port=%s, spring.profiles.active=%s]%n", getProperty("server.port"), getProperty("spring.profiles.active"));
    }

    @Override
    public void run(String... args) throws Exception {
        log.info("CommandLineRunner 触发（应用启动完成）");

    }

}
